home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
scheme
/
gjr
/
cmplrtst.lha
/
reptd.scm
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1990-03-27
|
292 b
|
20 lines
;;; -*- Scheme -*-
#|
Description:
This code tests the closing code.
Usage:
((repeated 1+ 4) 5) -> 9
|#
(declare (usual-integrations))
(define (repeated f n)
(define (loop m accum)
(if (zero? m)
accum
(loop (-1+ m)
(lambda (x)
(accum (f x))))))
(loop n (lambda (x) x)))